namespace Digitalmes.Domain.Sys;

/// <summary>
/// 授权表
/// </summary>
[SugarTable("sys_permission", "授权表")]
public class SysPermission : EntityBaseId
{
    /// <summary>
    /// 角色编号
    /// </summary>
    [SugarColumn(ColumnDescription = "角色编号")]
    public long RoleId { get; set; }

    /// <summary>
    /// 菜单编号
    /// </summary>
    [SugarColumn(ColumnDescription = "菜单编号")]
    public long MenuId { get; set; }

    /// <summary>
    /// 接口权限集合
    /// </summary>
    [SugarColumn(ColumnDescription = "接口权限集合", IsJson = true, Length = 2048)]
    public List<SysMenuApiUrl> Api { get; set; } = new();

    /// <summary>
    /// 授权类型1=角色-菜单
    /// </summary>
    [SugarColumn(ColumnDescription = "授权类型, 1=角色-菜单")]
    public int Types { get; set; } = 1;
}
